var DateUtil={
  toDateString:function (date) {
    var aStrings = date.toString().split(" ");
    if (aStrings[1]=="Jan") {
      aStrings[1] = "01";
    }
    if (aStrings[1]=="Feb") {
      aStrings[1] = "02";
    }
    if (aStrings[1]=="Mar") {
      aStrings[1] = "03";
    }
    if (aStrings[1]=="Apr") {
      aStrings[1] = "04";
    }
    if (aStrings[1]="May") {
      aStrings[1] = "05";
    }
    if (aStrings[1]=="Jun") {
      aStrings[1] = "06";
    }
    if (aStrings[1]=="Jul") {
      aStrings[1] = "07";
    }
    if (aStrings[1]=="Aug") {
      aStrings[1] = "08";
    }
    if (aStrings[1]=="Sep") {
      aStrings[1] = "09";
    }
    if (aStrings[1]=="Oct") {
      aStrings[1] = "10";
    }
    if (aStrings[1]=="Nov") {
      aStrings[1] = "11";
    }
    if (aStrings[1]=="Dec") {
      aStrings[1] = "12";
    }
    return aStrings[5] + "-" + aStrings[1] + "-" + aStrings[2] + " " + aStrings[3];
  }
}
